﻿package  com.args.utils.xml
{
	
	/**
	 * ...
	 * @author flexin'
	 * @link http://args.cn
	 */
	public class xmlListToArray 
	{
		
			 /**
			 * xmlList转换成Array
			*/
		     public static function convert(results:XMLList):Array
            {
                var array:Array=new Array();
                for each(var child:XML in results)
                {
                    var obj:Object=new Object();
                    for each(var ite:XML in child.children())
                    {
                        obj[ite.name().toString()]=child[ite.name().toString()];
                    }
                    array.push(obj);                    
               }
               return array;
            }
		
	}
	
}